<?php
namespace app\backstage\validate;

use think\Validate;

class Bank extends Validate
{
    protected $rule = [
        'id'             => 'require|gt:0',
        'bank_name'      => 'require',
        'branch_title'   => 'require',
        'payee_name'     => 'require',
        'bank_account'   => 'require',
    ];

    protected $message  =   [
        'id.require'              => '信息ID不能为空',
        'id.gt'                   => '信息ID不能为空',
        'bank_name.require'       => '收款银行名称不能为空',
        'branch_title.require'    => '支行名称不能为空',
        'payee_name.require'      => '收款人姓名不能为空',
        'bank_account.require'    => '收款银行卡号不能为空',
    ];

    protected $scene = [
        'add'   => ['bank_name','branch_title','payee_name','bank_account'],
        'edit'  => ['id','bank_name','branch_title','payee_name','bank_account'],
        'info'  => ['id'],
    ];
}